package com.dolphin.common.expr.emus;

import lombok.Getter;

/**
 * @author shida
 */

@Getter
public enum WindowTypeEnum {

    NATURE("NATURE", "自然窗口"),
    SLIDE("SLIDE", "滑动窗口"),
    EVER("EVER", "永远窗口");

    private String code;
    private String desc;

    WindowTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static WindowTypeEnum getByCode(String code) {
        for (WindowTypeEnum windowTypeEnum : values()) {
            if (windowTypeEnum.getCode().equals(code)) {
                return windowTypeEnum;
            }
        }
        return null;
    }
}
